<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="row">
    <div class="box col-md-12">
        <div class="box-inner">
            <div class="box-header well" data-original-title="">
                <h2><i class="glyphicon glyphicon-edit"></i> Student Registration</h2>

            
            </div>
            <div class="box-content">
                <form role="form" action="UpdateExamAction.do" method="post">
                   
                    <input type="hidden" name="id" value="${sessionScope.detail.id}">
                    <input type="hidden" name="addedby" value="${sessionScope.faculty.id}">
                    
                    <div class="form-group">
                        <label for="exampleInputEmail1">Exam Name</label>
                        <input type="text" name="name" value="${sessionScope.detail.name}" class="form-control" id="exampleInputEmail1" placeholder="Enter Exam Name" >
                    </div>
                     <div class="form-group">

                        <label>Start Date</label>

                        <div>
                            Day
                            <select name="sday">
                                <c:forEach var="i" begin="1" end="31">
                                   <c:choose>
                                    <c:when test="${sessionScope.sdate_day eq i}">
                                        <option selected="true"><c:out value="${i}"/></option>
                                    </c:when>
                                    <c:otherwise>
                                        <option><c:out value="${i}"/></option>
                                    </c:otherwise>

                                </c:choose>
                                </c:forEach>

                            </select>
                            Month

                            <select name="smonth">
                                <c:forEach var="i" begin="1" end="12">
                                    <c:choose>
                                    <c:when test="${sessionScope.sdate_month eq i}">
                                        <option selected="true"><c:out value="${i}"/></option>
                                    </c:when>
                                    <c:otherwise>
                                        <option><c:out value="${i}"/></option>
                                    </c:otherwise>

                                </c:choose>
                                </c:forEach>

                            </select>
                            Year
                            <select name="syear">
                                <c:forEach var="i" begin="1990" end="2020">
                                     <c:choose>
                                    <c:when test="${sessionScope.sdate_year eq i}">
                                        <option selected="true"><c:out value="${i}"/></option>
                                    </c:when>
                                    <c:otherwise>
                                        <option><c:out value="${i}"/></option>
                                    </c:otherwise>

                                </c:choose>
                                </c:forEach>

                            </select>
                        </div>
                    </div>
               <div class="form-group">

                        <label>End Date</label>

                        <div>
                            Day
                            <select name="eday">
                                <c:forEach var="i" begin="1" end="31">
                                   <c:choose>
                                    <c:when test="${sessionScope.edate_day eq i}">
                                        <option selected="true"><c:out value="${i}"/></option>
                                    </c:when>
                                    <c:otherwise>
                                        <option><c:out value="${i}"/></option>
                                    </c:otherwise>

                                </c:choose>
                                </c:forEach>

                            </select>
                            Month

                            <select name="emonth">
                                <c:forEach var="i" begin="1" end="12">
                                    <c:choose>
                                    <c:when test="${sessionScope.edate_month eq i}">
                                        <option selected="true"><c:out value="${i}"/></option>
                                    </c:when>
                                    <c:otherwise>
                                        <option><c:out value="${i}"/></option>
                                    </c:otherwise>

                                </c:choose>
                                </c:forEach>

                            </select>
                            Year
                            <select name="eyear">
                                <c:forEach var="i" begin="1990" end="2020">
                                     <c:choose>
                                    <c:when test="${sessionScope.edate_year eq i}">
                                        <option selected="true"><c:out value="${i}"/></option>
                                    </c:when>
                                    <c:otherwise>
                                        <option><c:out value="${i}"/></option>
                                    </c:otherwise>

                                </c:choose>
                                </c:forEach>

                            </select>
                        </div>
                    </div>

                 
                    
                  
                 <div class="form-group">
                            <label for="exampleInputEmail1">Semester</label>
                            <select name="semester">
                            <c:forEach var="i" begin="1" end="8">
                                <c:choose>
                                    <c:when test="${sessionScope.detail.semester eq i}">
                                        <option selected="true"><c:out value="${i}"/></option>
                                    </c:when>
                                    <c:otherwise>
                                        <option><c:out value="${i}"/></option>
                                    </c:otherwise>

                                </c:choose>

                            </c:forEach>

                        </select>
                    </div>
                    
                     <div class="form-group">
                        <label for="exampleInputEmail1">Branch</label>
                        <select name="bid">
                            
                            <c:forEach var="branch" items="${applicationScope.li_allbranches}">
                                
                                <c:choose>
                                    <c:when test="${sessionScope.detail.branch.name eq branch.name}">
                                        <option selected="true" value="${branch.id}"><c:out value="${branch.name}"/></option>
                                        
                                    </c:when>
                                    <c:otherwise>
                                        <option value="${branch.id}">${branch.name}</option>
                                    </c:otherwise>
                                </c:choose>
                               
                            </c:forEach>

                        </select>
                    </div>
                    
                    <div class="form-group">
                    <button type="submit" class="btn btn-default">Submit</button>
                </form>

           
        </div>
    </div>
    <!--/span-->

</div><!--/row-->

    <!-- content ends -->
    </div><!--/#content.col-md-0-->
</div>